<template>
	<view>
		<u-swiper :height="250" :list="lun" :effect3d="true" :interval="3000" @click="click"></u-swiper>
		<uni-group title="医院简介">
			<view v-html="content.brief"></view>
		</uni-group>
		<view class="u-demo">
			<button @click="toyuyue">预约挂号</button>
		</view>
	</view>
</template>

<script>
	import api from '../../../../commer/apiURL.js'
	export default {
		data() {
			return {
				base:api.baseurl,
				content:'',
				lun:[],
				id:'',
				
			}
		},
		onLoad(options) {
			this.getian(options.id)
			this.getlun(options.id)
			this.id = options.id
		},
		methods: {
			toyuyue(){
				uni.navigateTo({
					url:'renjiu?id='+this.id
				})
			},
			getlun(id){
				this.$get(this.base+'/prod-api/api/hospital/banner/list',{
					hospitalId:id
				}).then((res)=>{
					res.data.forEach((item)=>{
						this.lun.push({
							image:this.base+item.imgUrl
						})
					})
				})
			},
			getian(id){
				this.$get(this.base+'/prod-api/api/hospital/hospital/'+id).then((res)=>{
					this.content = res.data
				})
			}
		}
	}
</script>

<style>

</style>
